package com.yupi.kqapibackend.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yupi.kqapibackend.common.ErrorCode;
import com.yupi.kqapibackend.exception.BusinessException;
import com.yupi.kqapibackend.model.entity.InterfaceInfo;
import com.yupi.kqapibackend.model.entity.UserInterfaceInfo;
import com.yupi.kqapibackend.model.vo.InterfaceInfoVO;
import com.yupi.kqapibackend.service.UserInterfaceInfoService;
import com.yupi.kqapibackend.mapper.UserInterfaceInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author lenovo
*/
@Service
public class UserInterfaceInfoServiceImpl extends ServiceImpl<UserInterfaceInfoMapper, UserInterfaceInfo>
    implements UserInterfaceInfoService{

    @Resource
    UserInterfaceInfoMapper userInterfaceInfoMapper;
    @Override
    public List<InterfaceInfoVO> getTopThreeInterface() {
        List<InterfaceInfoVO> topThree = userInterfaceInfoMapper.getTopThree();
        for (int i = 0; i < 3; i++) {
            InterfaceInfoVO interfaceInfoVO = topThree.get(i);
            interfaceInfoVO.setName("测试接口" + (i + 1));
        }
        return topThree;
    }
}




